package com.atguigu.jxc.dao;

import com.atguigu.jxc.entity.Customer;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @ClassName CustomerDao
 * @Author 波
 * @Date 2024/9/24 14:24
 */
@Mapper
public interface CustomerDao {
    List<Customer> list(@Param("offset") int offset, @Param("rows") Integer rows, @Param("customerName") String customerName);

    int getCount(@Param("customerName") String customerName);

    int save(@Param("customerName") String customerName, @Param("contacts") String contacts, @Param("phoneNumber") String phoneNumber, @Param("address") String address, @Param("remarks") String remarks);

    int update(@Param("customerId") Integer customerId, @Param("customerName") String customerName, @Param("contacts") String contacts, @Param("phoneNumber") String phoneNumber, @Param("address") String address, @Param("remarks") String remarks);

    int delete(@Param("id") int id);
}
